<template>
	<div>
		<div :class="['recordList',tabIndex==index?'ractive':'']" v-for="(item,index) in zhData" :key="index" @click="chooseCase(index,item)">
			<div class="record1 flex-h" style="margin-bottom: 0.15rem;">
				<span class="sp1 flex1">
					<img style="width: 0.4rem;height: 0.4rem;margin-top: 0.05rem;" class="imgIcon" :src="tabIndex==index?img2:img1" alt="">
				</span>
				<span class="sp2" style="opacity: 0;">第次生成</span>
			</div>
			<div class="record1  flex-h">
				<span class="sp1 flex1">综合测试结果</span>
				<span class="sp3">

				</span>
			</div>
			<!-- <div class="record2 flex-h" @click.stop="gotos(item.id)"> -->
				<div class="record2 flex-h">
				<span class="sp1 flex1">生成时间</span>
				<span class="sp2">{{(new Date(item.createTime)).format('yyyy-MM-dd hh:mm')}}</span>
			</div>
			<div v-if="flagbot==false">
				<div class="record3">
					<span>推荐专业类</span>
				</div>
				<div class="record4 flex-h">
					<span class="flex1" v-for="(its,$index) in item.majors" :Key="$index+100">{{its.major}}</span>
				</div>
			</div>
		
		</div>
	</div>
</template>

<script>
	import ls from 'store2';
	import {format} from '~/plugins/filter';
	export default {
		props: {
			zhData: Array,
			flagbot: {
				type: Boolean,
				default: false
			}
		},
 
		data() {
			return {
				tabIndex: 0,
				img1: require('~/static/images/search_icon_nor.png'),
				img2: require('~/static/images/search_icon_sure.png')
			};
		},
		computed: {

		},
		mounted: function() {
			this.$emit('fromChild', this.tabIndex)
		},
		methods: {
			chooseCase(index, item) {
				this.tabIndex = index
				this.$emit('fromChild', this.tabIndex)
			},
			gotos(ids) {
				ls.set('zhId', ids);
				this.commonJs.gosto('../evaluation/resultDetails')
			}

		}
	};
</script>


<style scoped lang="less">
	.recordList {
		margin-top: 0.3rem;
		width: 100%;
		// height:3.76rem;
		height: auto;
		box-shadow: 0px 0px 0.2rem 0px rgba(204, 204, 204, 0.3);
		border-radius: 0.1rem;
		border: 0.02rem solid rgba(238, 238, 238, 1);
		padding: 0.2rem 0.3rem;
		box-sizing: border-box;

		.record1 {
			height: 0.5rem;
			line-height: 0.5rem;

			.sp1 {
				font-size: 0.3rem;
				font-weight: bold;
				color: rgba(34, 34, 34, 1);
			}

			.sp2 {
				width: 1.9rem;
				height: 0.5rem;
				background: rgba(250, 250, 250, 1);
				border-radius: 0.25rem;
				font-size: 0.24rem;
				font-weight: bold;
				color: rgba(187, 187, 187, 1);
				line-height: 0.5rem;
				text-align: center;
			}

			.sp3 {
				width: 0.3rem;

				img {
					width: 0.2rem;
					height: auto;
				}
			}
		}

		.record2 {
			height: 0.5rem;
			line-height: 0.5rem;
			margin-top: 0.3rem;

			.sp2 {
				flex: 2
			}

			.sp1,
			.sp2 {
				font-size: 0.26rem;
				// font-family:PingFang-SC-Medium;
				font-weight: 500;
				color: rgba(153, 153, 153, 1);
				// line-height:37px;
			}

		}

		.record3 {
			margin-top: 0.3rem;
			padding: 0.18rem 0;
			height: auto;
			border-top: 0.02rem solid rgba(238, 238, 238, 1);

			span {
				font-size: 0.24rem;
				font-weight: bold;
				color: rgba(187, 187, 187, 1);

			}

		}

		.record4 {
			width: 100%;
			height: auto;

			span {

				width: 1.96rem;
				height: 0.8rem;
				background: rgba(250, 250, 250, 1);
				border-radius: 0.1rem;
				filter: blur(0px);
				font-size: 0.24rem;

				font-weight: bold;
				color: rgba(34, 34, 34, 1);
				line-height: 0.8rem;
				margin-right: 0.2rem;
				text-align: center;
			}

			.sp3 {
				margin-right: 0;
			}
		}
	}

	.ractive {
		border: 0.02rem solid @mainColor;
		box-shadow: 0px 0px 20px 0px rgba(204, 204, 204, 0.3);
	}
</style>
